package gui.main_menu;

import java.awt.Color;
import javax.swing.JLabel;

public class AttributesColor {
	
	public static JLabel setColor(JLabel label) {
		
		int value = Integer.parseInt(label.getText());
		
		if (value >= 80) 
			label.setBackground(new Color(0,145,0));
		else if (value >= 78) 
			label.setBackground(new Color(20,170,10));
		else if (value >= 76) 
			label.setBackground(new Color(50,195,30));
		else if (value >= 73) 
			label.setBackground(new Color(80,220,50));
		else if (value >= 70) 
			label.setBackground(new Color(100,255,60));
		else if (value >= 60)
			label.setBackground(new Color(255,255,255));
		else
			label.setBackground(new Color(220,220,220));
		
		return label;
	}
}
